﻿@{
    ViewBag.Title = "Config";
}
<div class="easyui-layout" style="width:inherit;height:inherit">
    <div class="easyui-tabs" data-options="region:'north'" style="width:inherit;height:inherit">
        <div title="套餐配置" style="padding:10px;">
            <table style="width:inherit;">
                <tr>
                    <td>
                        <div class="fitem">
                            <label>图片:</label>
                            <img style="width:150px;height:150px;" />
                            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="">浏览</a>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="fitem">
                            <label>描述:</label>
                            <input name="craftname" class="easyui-validatebox">
                        </div>
                    </td>
                </tr>
            
            </table>
        </div>
        <div title="品牌项目" style="padding:10px">
            <table id="dg" class="easyui-datagrid" style="width:inherit;height:inherit"
                    url=""
                    toolbar="#toolbar"
                    rownumbers="true" fitColumns="true" singleSelect="true">
                <thead>
                    <tr>
                        <th field="NAME" width="50">主材</th>
                        <th field="DESCRIPTION" width="50">品牌</th>
                    </tr>
                </thead>
            </table>
            <div id="toolbar">
                <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newBrand()">添加</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editBrand()">编辑</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="destroyBrand()">删除</a>
            </div>
    
            <div id="dlg" class="easyui-dialog" style="width:400px;height:280px;padding:10px 20px"
                    closed="true" buttons="#dlg-buttons">
                <form id="fm" method="post" novalidate>
                    <div class="fitem">
                        <label>主材:</label>
                        <input name="craftname" class="easyui-validatebox" required="true">
                    </div>
                    <div class="fitem">
                        <label>品牌:</label>
                        <input name="craftname" class="easyui-validatebox" required="true">
                    </div>
                </form>
            </div>
            <div id="dlg-buttons">
                <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveCraft()">Save</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">Cancel</a>
            </div>
        </div>
        <div title="空间项目" style="padding:10px">
              <table id="dg1" class="easyui-datagrid" style="width:inherit;height:inherit"
                    url=""
                    toolbar="#toolbar1"
                    rownumbers="true" fitColumns="true" singleSelect="true">
                <thead>
                    <tr>
                        <th field="NAME" width="50">空间类别</th>
                        <th field="DESCRIPTION" width="50">项目说明</th>
                    </tr>
                </thead>
            </table>
            <div id="toolbar1">
                <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newRoom()">添加</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editRoom()">编辑</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="destroyRoom()">删除</a>
            </div>
    
            <div id="dlg1" class="easyui-dialog" style="width:400px;height:280px;padding:10px 20px"
                    closed="true" buttons="#dlg-buttons1">
                <form id="fm" method="post" novalidate>
                    <div class="fitem">
                        <label>空间类别:</label>
                        <input name="roomname" class="easyui-validatebox" required="true">
                    </div>
                    <div class="fitem">
                        <label>项目说明:</label>
                        <input name="roomdescript" class="easyui-validatebox" required="true">
                    </div>
                </form>
            </div>
            <div id="dlg-buttons1">
                <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveCraft()">Save</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">Cancel</a>
            </div>  
        </div>
        <div title="展厅"  style="padding:10px">
            <div  style="padding:5px;">
                <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" onclick="newCraft()">添加</a>
            </div>
            <div id="p" class="easyui-panel" style="width:inherit;height:320px;padding:10px; margin:5px;">
                <table style="width:inherit;">
                    <tr>
                        <td>
                            <div class="fitem">
                                <label>展厅名称:</label>
                                <input name="craftname" class="easyui-validatebox">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="fitem">
                                <label>展厅图片:</label>
                                <img style="width:150px;height:150px;" />
                                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="">浏览</a>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="fitem" style="text-align:right;">
                                <a href="javascript:void(0)" iconCls="icon-cancel" class="easyui-linkbutton" onclick="">删除</a>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>  
        </div>
    </div>
    <div data-options="region:'south',split:true" style="height:50px; text-align:right;">
        <div style="margin:8px;">
            <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveCraft()">保存</a>
        </div>
    </div>
</div>
<script type="text/javascript">
    var url;
    function newBrand() {
        $('#dlg').dialog('open').dialog('setTitle','新增品牌项目');
        $('#fm').form('clear');
        url = '';
    }

    function newRoom() {
        $('#dlg1').dialog('open').dialog('setTitle', '新增空间项目');
        $('#fm1').form('clear');
        url = 'save_user.php';
    }
</script>

 
<style type="text/css">
    #fm{
        margin:0;
        padding:10px 30px;
    }
    .ftitle{
        font-size:14px;
        font-weight:bold;
        padding:5px 0;
        margin-bottom:10px;
        border-bottom:1px solid #ccc;
    }
    .fitem{
        margin-bottom:5px;
    }
    .fitem label{
        display:inline-block;
        width:80px;
    }
</style>
